import { Button } from 'antd'
import ChooseQywxs from '@/desktop/components/ChooseQywxs'
import './ChooseQywxs.module.less'

export default function EditChooseQywxs(props: {
  wxids: string[]
  choosed: (wxids: string[]) => void
}) {
  const { wxids: initialWxids, choosed } = props
  const [wxids, setWxids] = useState(initialWxids)

  return <>
    <div styleName="choose-qywxs">
      <div styleName="describe">与选中的企微账号聊天中发送口令时，将触发进群动作。</div>
      <ChooseQywxs choosed={wxids} setChoosed={setWxids} />
    </div>
    <footer>
      <Button type="primary" disabled={!wxids.length} onClick={() => choosed(wxids)}>
        下一步
      </Button>
    </footer>
  </>
}
